package top.mccsdl.Acbot.eventListener.listeners;

import com.alibaba.fastjson2.JSONObject;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import top.mccsdl.Acbot.config.EventName;
import top.mccsdl.Acbot.eventListener.EventListener;

/**
 * 频道退出事件
 */
@Service
@Slf4j
@EventName("GUILD_MEMBER_REMOVE")
public class GuildMemberRemoveListener implements EventListener {
    @Override
    public void onEvent(JSONObject eventData) {
//        String groupId = eventData.getString("guild_id");
//        Message message = new Message();//主动
//        message.setContent("擦,拉黑拉黑这小子竟然退频道\n嘎码完成");
//        String result = HttpRequest.post(String.format(DOMAIN + POST_CHANNELS_PUB_MSG, groupId))
//                .body(message.toJsonStr())
//                 .header("Authorization", "QQBot " + botConfig.getAccessToken)
//                .execute().body();
//        log.info("频道用户退出事件发送返回===>" + result);
    }
}
